<style type="text/css">
    .sm-st {
        background: #fff;
        padding: 20px;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        margin-bottom: 20px;
    }

    .sm-st-icon {
        width: 60px;
        height: 60px;
        display: inline-block;
        line-height: 60px;
        text-align: center;
        font-size: 30px;
        background: #eee;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
        float: left;
        margin-right: 10px;
        color: #fff;
    }

    .sm-st-info {
        padding-top: 2px;
    }

    .sm-st-info span {
        display: block;
        font-size: 24px;
        font-weight: 600;
    }

    .orange {
        background: #fa8564 !important;
    }

    .tar {
        background: #45cf95 !important;
    }

    .sm-st .green {
        background: #86ba41 !important;
    }

    .pink {
        background: #AC75F0 !important;
    }

    .yellow-b {
        background: #fdd752 !important;
    }

    .stat-elem {

        background-color: #fff;
        padding: 18px;
        border-radius: 40px;

    }

    .stat-info {
        text-align: center;
        background-color: #fff;
        border-radius: 5px;
        margin-top: -5px;
        padding: 8px;
        -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        font-style: italic;
    }

    .stat-icon {
        text-align: center;
        margin-bottom: 5px;
    }

    .st-red {
        background-color: #F05050;
    }

    .st-green {
        background-color: #27C24C;
    }

    .st-violet {
        background-color: #7266ba;
    }

    .st-blue {
        background-color: #23b7e5;
    }

    .stats .stat-icon {
        color: #28bb9c;
        display: inline-block;
        font-size: 26px;
        text-align: center;
        vertical-align: middle;
        width: 50px;
        float: left;
    }

    .stat {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    .stat .value {
        font-size: 20px;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
    }

    .stat .name {
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 5px 0;
    }

    .stat.lg .value {
        font-size: 26px;
        line-height: 28px;
    }

    .stat-col {
        margin:0 0 10px 0;
    }
    .stat.lg .name {
        font-size: 16px;
    }

    .stat-col .progress {
        height: 2px;
    }

    .stat-col .progress-bar {
        line-height: 2px;
        height: 2px;
    }

    .item {
        padding: 30px 0;
    }


    #statistics .panel {
        min-height: 150px;
    }

    #statistics .panel h5 {
        font-size: 14px;
    }

    .tab-content > .chart {
        padding: 10px;
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        {:build_heading(null, false)}
<!--        <ul class="nav nav-tabs">-->
<!--            <li><a href="#one" data-toggle="tab">{:__('Dashboard')}</a></li>-->
<!--            <li class="active"><a href="#two" data-toggle="tab">{:__('Custom')}</a></li>-->
<!--        </ul>-->
    </div>
    <div class="panel-body">
        <div class="row">
            <section class="col-lg-7 connectedSortable">
                <!-- Custom tabs (Charts with tabs)-->
                <div class="nav-tabs-custom charts-custom">
                    <!-- Tabs within a box -->
                    <ul class="nav nav-tabs pull-right">
                        <li>
                            <form action="">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">日期</label>
                                    <div class="col-sm-10">
                                        <input id="birthday" data-rule="" class="form-control datetimerange" autoComplete="off" name="row[year]" type="text" value="">
                                    </div>
                                </div>
                            </form>
                        </li>
<!--                        <li><a href="#area-chart" data-toggle="tab">区域图</a></li>-->
                        <li class="pull-left header"><i class="fa fa-inbox"></i> 销售趋势</li>
                    </ul>
                </div>
            </section>
        </div>

        <div class="row">
            <div class="col-sm-3 col-xs-6">
                <div class="sm-st clearfix">
                    <span class="sm-st-icon st-red"><i class="fa fa-users"></i></span>
                    <div class="sm-st-info">
                        <span>{$totaluser}</span>
                        {:__('Total user')}
                    </div>
                </div>
            </div>
            <div class="col-sm-3 col-xs-6">
                <div class="sm-st clearfix">
                    <span class="sm-st-icon st-violet"><i class="fa fa-magic"></i></span>
                    <div class="sm-st-info">
                        <span>{$totaladdon}</span>
                        {:__('Total addon')}
                    </div>
                </div>
            </div>
            <div class="col-sm-3 col-xs-6">
                <div class="sm-st clearfix">
                    <span class="sm-st-icon st-blue"><i class="fa fa-leaf"></i></span>
                    <div class="sm-st-info">
                        <span>{$attachmentnums}</span>
                        {:__('Total attachment')}
                    </div>
                </div>
            </div>
            <div class="col-sm-3 col-xs-6">
                <div class="sm-st clearfix">
                    <span class="sm-st-icon st-green"><i class="fa fa-user"></i></span>
                    <div class="sm-st-info">
                        <span>{$totaladmin}</span>
                        {:__('Total admin')}
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-8">
                <div id="echart" class="btn-refresh" style="height:300px;width:100%;"></div>
            </div>
            <div class="col-lg-4">
                <div class="card sameheight-item stats">
                    <div class="card-block">
                        <div class="row row-sm stats-container">
                            <div class="col-xs-6 stat-col">
                                <div class="stat-icon"><i class="fa fa-rocket"></i></div>
                                <div class="stat">
                                    <div class="value"> {$todayusersignup}</div>
                                    <div class="name"> {:__('Today user signup')}</div>
                                </div>
                                <div class="progress">
                                    <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                </div>
                            </div>
                            <div class="col-xs-6 stat-col">
                                <div class="stat-icon"><i class="fa fa-vcard"></i></div>
                                <div class="stat">
                                    <div class="value"> {$todayuserlogin}</div>
                                    <div class="name"> {:__('Today user login')}</div>
                                </div>
                                <div class="progress">
                                    <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                </div>
                            </div>
                            <div class="col-xs-6  stat-col">
                                <div class="stat-icon"><i class="fa fa-calendar"></i></div>
                                <div class="stat">
                                    <div class="value"> {$threednu}</div>
                                    <div class="name"> {:__('Three dnu')}</div>
                                </div>
                                <div class="progress">
                                    <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                </div>
                            </div>
                            <div class="col-xs-6 stat-col">
                                <div class="stat-icon"><i class="fa fa-calendar-plus-o"></i></div>
                                <div class="stat">
                                    <div class="value"> {$sevendnu}</div>
                                    <div class="name"> {:__('Seven dnu')}</div>
                                </div>
                                <div class="progress">
                                    <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                </div>
                            </div>
                            <div class="col-xs-6  stat-col">
                                <div class="stat-icon"><i class="fa fa-user-circle"></i></div>
                                <div class="stat">
                                    <div class="value"> {$sevendau}</div>
                                    <div class="name"> {:__('Seven dau')}</div>
                                </div>
                                <div class="progress">
                                    <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                </div>
                            </div>
                            <div class="col-xs-6  stat-col">
                                <div class="stat-icon"><i class="fa fa-user-circle-o"></i></div>
                                <div class="stat">
                                    <div class="value"> {$thirtydau}</div>
                                    <div class="name"> {:__('Thirty dau')}</div>
                                </div>
                                <div class="progress">
                                    <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

<!--        <div class="row" style="margin-top:15px;" id="statistics">-->

<!--            <div class="col-lg-12">-->
<!--            </div>-->
<!--            <div class="col-xs-6 col-md-3">-->
<!--                <div class="panel bg-blue-gradient no-border">-->
<!--                    <div class="panel-body">-->
<!--                        <div class="panel-title">-->
<!--                            <span class="label label-primary pull-right">{:__('Real time')}</span>-->
<!--                            <h5>{:__('Working addon count')}</h5>-->
<!--                        </div>-->
<!--                        <div class="panel-content">-->
<!--                            <div class="row">-->
<!--                                <div class="col-md-12">-->
<!--                                    <h1 class="no-margins">{$totalworkingaddon}</h1>-->
<!--                                    <div class="font-bold"><i class="fa fa-magic"></i>-->
<!--                                        <small>{:__('Working addon count tips')}</small>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-xs-6 col-md-3">-->
<!--                <div class="panel bg-teal-gradient no-border">-->
<!--                    <div class="panel-body">-->
<!--                        <div class="ibox-title">-->
<!--                            <span class="label label-primary pull-right">{:__('Real time')}</span>-->
<!--                            <h5>{:__('Database count')}</h5>-->
<!--                        </div>-->
<!--                        <div class="ibox-content">-->
<!--                            <div class="row">-->
<!--                                <div class="col-md-6">-->
<!--                                    <h1 class="no-margins">{$dbtablenums}</h1>-->
<!--                                    <div class="font-bold"><i class="fa fa-database"></i>-->
<!--                                        <small>{:__('Database table nums')}</small>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                                <div class="col-md-6">-->
<!--                                    <h1 class="no-margins">{$dbsize|format_bytes=###,'',0}</h1>-->
<!--                                    <div class="font-bold"><i class="fa fa-filter"></i>-->
<!--                                        <small>{:__('Database size')}</small>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->

<!--            <div class="col-xs-6 col-md-3">-->
<!--                <div class="panel bg-purple-gradient no-border">-->
<!--                    <div class="panel-body">-->
<!--                        <div class="ibox-title">-->
<!--                            <span class="label label-primary pull-right">{:__('Real time')}</span>-->
<!--                            <h5>{:__('Attachment count')}</h5>-->
<!--                        </div>-->
<!--                        <div class="ibox-content">-->

<!--                            <div class="row">-->
<!--                                <div class="col-md-6">-->
<!--                                    <h1 class="no-margins">{$attachmentnums}</h1>-->
<!--                                    <div class="font-bold"><i class="fa fa-files-o"></i>-->
<!--                                        <small>{:__('Attachment nums')}</small>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                                <div class="col-md-6">-->
<!--                                    <h1 class="no-margins">{$attachmentsize|format_bytes=###,'',0}</h1>-->
<!--                                    <div class="font-bold"><i class="fa fa-filter"></i>-->
<!--                                        <small>{:__('Attachment size')}</small>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="col-xs-6 col-md-3">-->
<!--                <div class="panel bg-green-gradient no-border">-->
<!--                    <div class="panel-body">-->
<!--                        <div class="ibox-title">-->
<!--                            <span class="label label-primary pull-right">{:__('Real time')}</span>-->
<!--                            <h5>{:__('Picture count')}</h5>-->
<!--                        </div>-->
<!--                        <div class="ibox-content">-->

<!--                            <div class="row">-->
<!--                                <div class="col-md-6">-->
<!--                                    <h1 class="no-margins">{$picturenums}</h1>-->
<!--                                    <div class="font-bold"><i class="fa fa-picture-o"></i>-->
<!--                                        <small>{:__('Picture nums')}</small>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                                <div class="col-md-6">-->
<!--                                    <h1 class="no-margins">{$picturesize|format_bytes=###,'',0}</h1>-->
<!--                                    <div class="font-bold"><i class="fa fa-filter"></i>-->
<!--                                        <small>{:__('Picture size')}</small>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->

        <div class="row">
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-aqua">
                    <div class="inner">
                        <h3>150</h3>

                        <p>今日购买产品</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-shopping-cart"></i>
                    </div>
                    <a href="#" class="small-box-footer">更多 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-green">
                    <div class="inner">
                        <h3>53<sup style="font-size: 20px">%</sup></h3>

                        <p>购买总金额</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-area-chart"></i>
                    </div>
                    <a href="#" class="small-box-footer">更多 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-yellow">
                    <div class="inner">
                        <h3>44</h3>

                        <p>今日注册用户数</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-users"></i>
                    </div>
                    <a href="#" class="small-box-footer">更多 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-red">
                    <div class="inner">
                        <h3>65</h3>

                        <p>总金额</p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-user"></i>
                    </div>
                    <a href="#" class="small-box-footer">更多 <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
        </div>
        <!-- /.row -->
        <!-- Main row -->
        <div class="row" style="margin-bottom:5px;">
            <!-- Left col -->
            <section class="col-lg-7 connectedSortable">
                <!-- Custom tabs (Charts with tabs)-->
                <div class="nav-tabs-custom charts-custom">
                    <!-- Tabs within a box -->
                    <ul class="nav nav-tabs pull-right">
                        <li class="active"><a href="#line-chart" data-toggle="tab">折线图</a></li>
                        <li><a href="#area-chart" data-toggle="tab">区域图</a></li>
                        <li class="pull-left header"><i class="fa fa-inbox"></i> 销售趋势</li>
                    </ul>
                    <div class="tab-content no-padding">
                        <!-- Morris chart - Sales -->
                        <div class="chart tab-pane active" id="line-chart" style="position: relative; height: 300px;"></div>
                        <div class="chart tab-pane" id="area-chart" style="position: relative; height: 300px;"></div>
                    </div>
                </div>
                <div class="nav-tabs-custom charts-custom">
                    <!-- Tabs within a box -->
                    <ul class="nav nav-tabs pull-right">
                        <li class="active"><a href="#pie-chart" data-toggle="tab">饼图</a></li>
                        <li><a href="#bar-chart" data-toggle="tab">柱状图</a></li>
                        <li class="pull-left header"><i class="fa fa-inbox"></i> 访问记录</li>
                    </ul>
                    <div class="tab-content no-padding">
                        <!-- Morris chart - Sales -->
                        <div class="chart tab-pane active" id="pie-chart" style="position: relative; height: 300px;"></div>
                        <div class="chart tab-pane" id="bar-chart" style="position: relative; height: 300px;"></div>
                    </div>
                </div>
                <!-- /.nav-tabs-custom -->

            </section>
            <!-- /.Left col -->
            <section class="col-lg-5 connectedSortable">

                <!-- Map box -->
                <div class="box box-solid bg-light-blue-gradient">
                    <div class="box-header">
                        <!-- tools box -->
                        <div class="pull-right box-tools">
                        </div>
                        <!-- /. tools -->

                        <i class="fa fa-map-marker"></i>

                        <h3 class="box-title">
                            访客分布
                        </h3>
                    </div>
                    <div class="box-body">
                        <div id="simplebar-chart" style="height: 250px; width: 100%;"></div>
                    </div>
                    <!-- /.box-body-->
                    <div class="box-footer no-border">
                        <div class="row">
                            <div class="col-xs-12 text-center">
                                <div class="knob-label">统计最近一周访客的记录</div>
                            </div>
                            <!-- ./col -->
                        </div>
                        <!-- /.row -->
                    </div>
                </div>
                <!-- /.box -->

                <!-- solid sales graph -->
                <div class="box box-solid bg-teal-gradient">
                    <div class="box-header">
                        <i class="fa fa-th"></i>

                        <h3 class="box-title">订单趋势</h3>

                        <div class="box-tools pull-right">
                        </div>
                    </div>
                    <div class="box-body border-radius-none">
                        <div class="chart" id="smoothline-chart" style="height: 250px;"></div>
                    </div>
                    <!-- /.box-body-->
                    <div class="box-footer no-border">
                        <div class="row">
                            <div class="col-xs-12 text-center">
                                <div class="knob-label">统计最近一周订单的趋势</div>
                            </div>
                            <!-- ./col -->
                        </div>
                        <!-- /.row -->
                    </div>
                </div>
                <!-- /.box -->

            </section>
            <!-- right col -->
        </div>
        <!-- /.row (main row) -->
    </div>
</div>

<!--<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>-->
<!--<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>-->
<!--<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>-->
<!--<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>-->
<!--<script>-->
<!--    $('#tj').click(function () {-->
<!--        var year = $("#birthday").val();-->
<!--        console.log(year);-->
<!--        //let url = '/BozFPLUfmy.php/statistics/payments/index?ref=addtabs&year='+year;-->
<!--        let url = '/QjaGeuOTbZ.php/statistics/echarts/index?year='+year;-->
<!--        //window.top.location.href = url;-->
<!--        location.href=url;-->
<!--    })-->

<!--    $('#birthday').daterangepicker({-->
<!--        // autoUpdateInput:true,-->
<!--        timePicker: true, //显示时间-->
<!--        timePicker24Hour: true, //时间制-->
<!--        timePickerSeconds: true, //时间显示到秒-->
<!--        // startDate: moment().hours(0).minutes(0).seconds(0), //设置开始日期-->
<!--        startDate: moment().startOf('year'), //设置开始日期-->
<!--        endDate: moment(new Date()), //设置结束器日期-->
<!--        maxDate: moment(new Date()), //设置最大日期-->
<!--        "opens": "center",-->
<!--        ranges: {-->
<!--            '今天': [moment().hours(0).minutes(0).seconds(0), moment()],-->
<!--            '昨天': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],-->
<!--            '上周': [moment().subtract(6, 'days'), moment()],-->
<!--            '前30天': [moment().subtract(29, 'days'), moment()],-->
<!--            '本月': [moment().startOf('month'), moment().endOf('month')],-->
<!--            '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]-->
<!--        },-->
<!--        showWeekNumbers: true,-->
<!--        locale: {-->
<!--            format: "YYYY-MM-DD HH:mm:ss", //设置显示格式-->
<!--            applyLabel: '确定', //确定按钮文本-->
<!--            cancelLabel: '取消', //取消按钮文本-->
<!--            customRangeLabel: '自定义',-->
<!--            daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],-->
<!--            monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',-->
<!--                '七月', '八月', '九月', '十月', '十一月', '十二月'-->
<!--            ],-->
<!--            firstDay: 1-->
<!--        },-->
<!--        autoUpdateInput:false,-->
<!--    }, function(start, end, label) {-->
<!--        timeRangeChange = [start.format('YYYY-MM-DD HH:mm:ss'),end.format('YYYY-MM-DD HH:mm:ss')];-->
<!--        // console.log(timeRangeChange);-->
<!--        $('#birthday').val(timeRangeChange[0]+'~'+timeRangeChange[1]);-->
<!--    });-->
<!--</script>-->

